import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_test_opengl_plugin/flutter_test_opengl_plugin.dart';
import 'package:flutter_test_opengl_plugin/flutter_test_opengl_plugin_platform_interface.dart';
import 'package:flutter_test_opengl_plugin/flutter_test_opengl_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterTestOpenglPluginPlatform
    with MockPlatformInterfaceMixin
    implements FlutterTestOpenglPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterTestOpenglPluginPlatform initialPlatform = FlutterTestOpenglPluginPlatform.instance;

  test('$MethodChannelFlutterTestOpenglPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterTestOpenglPlugin>());
  });

  test('getPlatformVersion', () async {
    FlutterTestOpenglPlugin flutterTestOpenglPlugin = FlutterTestOpenglPlugin();
    MockFlutterTestOpenglPluginPlatform fakePlatform = MockFlutterTestOpenglPluginPlatform();
    FlutterTestOpenglPluginPlatform.instance = fakePlatform;

    expect(await flutterTestOpenglPlugin.getPlatformVersion(), '42');
  });
}
